package FunctionalInteface_Consumer;

import java.util.function.Consumer;

public class ConsumerDemo {

	public static void main(String[] args) {
		useComsumer("陈冠希", (name) -> {
			System.out.println(name);
		}, name -> System.out.println(new StringBuilder(name).reverse().toString()));

	}

	public static void useComsumer(String name, Consumer<String> com1, Consumer<String> com2) {

//			com1.andThen(com2).accept(name);
		com1.accept(name);
		com2.accept(name);

	}

}
